using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using XEntity.InventoryItemSystem;

public class ItemManagerInit : MonoBehaviour
{

    ItemManager itemManager;

    private void Start() {
        itemManager = GetComponent<ItemManager>();
        AssetLabelReference textureLabel = new AssetLabelReference();

        textureLabel.labelString = "all";

        Addressables.LoadAssetsAsync<Item>(textureLabel,  (res) =>{
                Debug.Log("加载了一个资源： " + res.name);
                itemManager.AddItem(res);
        });
    }

 
}
